﻿using UnityEngine;
using UnityEngine.UI;

public delegate void VersionCheckDialogCallBack();

//本页面只有一个确定按钮
public class VersionCheckPage : MonoBehaviour
{
    public Text content;
    public Button confirmBtn;
    private VersionCheckDialogCallBack okCallBack;

    void Start()
    {
        confirmBtn.onClick.RemoveAllListeners();
        confirmBtn.onClick.AddListener(ConfirmBtnClick);
    }

    public void SetContent(string str)
    {
        content.text = str;
    }

    public void SetOkCallBack(VersionCheckDialogCallBack okCB)
    {
        okCallBack = okCB;
    }

    public void ConfirmBtnClick()
    {
        if (okCallBack != null)
            okCallBack();
        //Destroy(this.gameObject);
    }
}